<div class="row">
  <div class="col-sm-2 col-md-offset-1 setting-menu">
    <%= render "_sidebar.html", assigns %>
  </div>

  <div class="col-md-10">
    <div class="card">
      <div class="card-body">
        <%= form_for @changeset, setting_path(@conn, :update), [multipart: true], fn f -> %>
          <%= hidden_input f, :by, value: "show" %>
          <div class="row">
            <div class="col-sm-9">
              <div class="form-group">
                <%= text_input f, :email, class: "form-control", disabled: true %>
              </div>

              <div class="form-group">
                <%= checkbox(f, :email_public) %> <%= gettext "Public Email" %>

              </div>

              <div class="form-group">
                <%= file_input f, :avatar %>
                <div class="form-text">
                <%= gettext "Upload avatar" %>
                </div>
              </div>

              <div class="form-group">
                <%= textarea f, :bio, class: "form-control", placeholder: "Add user bio", rows: 4 %>
                <%= error_tag f, :bio %>
              </div>
            </div>
            <div class="col-sm-3">
              <div class="form-group avatar-preview" style="text-align: center;">
                <img class="media-object avatar-96" src="<%= qn_url(@current_user.avatar) %>" />
              </div>
            </div>
          </div>
          <div class="form-actions hide-ios">
            <%= submit gettext("Update"), class: "btn btn-primary" %>
          </div>
        <% end %>
      </div>
    </div>
  </div>
</div>
